// 1、as 具体类型
const myCanvas = document.getElementById("main_canvas") as HTMLCanvasElement
// 2、<> 加在需要断言的前边
const myCanvas2 = <HTMLCanvasElement>document.getElementById("main_canvas")

// 双重断言（不建议）
const a = ('hello' as unknown) as number